package lab02.test22;

public class Test22 {
    public static void main(String[] args) {
        String string="Hello.java 2017";
        StringBuffer stringBuffer=new StringBuffer();
        for (int i=0;i<string.length();i++){
            if(string.charAt(i)>'A'&&string.charAt(i)<'Z'){
                stringBuffer.append((char)(string.charAt(i)+32));
            }
            else if(string.charAt(i)>='0'&&string.charAt(i)<='9'){
                stringBuffer.append(0);
            }
            else if(string.charAt(i)>='a'&&string.charAt(i)<='z'){
                stringBuffer.append(string.charAt(i));
            }
            else{
                stringBuffer.append('#');
            }
        }
        System.out.println(stringBuffer);
    }
}
